package app.netant.book.shushu8;

import cn.lily.com.enviroment.Enviroment;
import app.netant.book.base.BaseDetail;
import app.netant.book.base.BaseEntity;
import app.netant.book.base.BasePage;
import app.netant.book.base.BaseRoot;

public class Shushu8Root extends BaseRoot {
	
	public Shushu8Root(){
		this.homeUrl = "http://www.shushu8.com/xuanhuan/";
		this.pageUrl = "http://www.shushu8.com/xuanhuan/";
		this.tableKey = "shushu8";
	}

	@Override
	public String buildUrl(int pageIdx) {
		return this.pageUrl+""+pageIdx+".html";
	}

	@Override
	public BasePage buildPage(String url) {
		return new Shushu8Page(url);
	}

	@Override
	public BaseDetail buildDetail(String url) {
		return new Shushu8Detail(url);
	}

	@Override
	public BaseEntity buildEntity() {
		return new Shushu8Entity();
	}
	
	@Override
	public void afterEntity(BaseEntity entity) {
		
	}
	
	public static void main(String[] args) {
		
		Enviroment.createEnv();
		Enviroment.getEnv().getLogBean().beginLog();
		
		Shushu8Root root = new Shushu8Root();
		//root.analyse(125);
		root.excepCycle();
	}


	
}
